package matImpl;

import uci.rt.ccr.engine.matrix.Mat;

public class MechaMatTest
{
	public static void main(String[] args)
	{
		int d = 10;
		double[][] data = new double[d][d];
		int k = 0;
		for (int row = 0; row < d; row++)
		{
			for (int col = 0; col < d; col++)
			{
				data[col][row] = k++;
			}
		}
		
		Mat a = new Mat(data);
	
		for (int w=10000;w<200000;w=w+10000){
		double t0 = System.currentTimeMillis();
		for(int i =0;i<w;i++){
			double[][] res = MechaMat.mechaMult(data, data);
		}
		double t1 = System.currentTimeMillis()-t0;
		System.out.println(w+" mechaMat: "+ t1);
		
		
		double t2 = System.currentTimeMillis();		
		for(int i =0;i<w;i++){
			Mat c = a.multiply(a);
		}
		double t3 = System.currentTimeMillis()-t2;
		System.out.println(w+" Multiply: "+ t3);
		}

	}
}
